<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<style>
		.father{
			width: 300px;
			height: 300px;
			background-color:red;
		}
	</style>
</head>
<body>
	
	<div class="father">
		<button class="child">按钮</button>
	</div>
	<script src="jquery.js"></script>
	<script>
		
		$(function () {
			//默认传过来 一个event
			$('.child').click(function(event) {
				console.log('按钮被点击了');
				console.log(this);
				// console.log(event.currentTarget);
				console.log(event.target);
				//阻止事件冒泡
				// event.stopPropagation()

				
			});

			$('.father').mouseenter(function(event) {
				console.log(event.type)
				console.log('父盒子被点击了');
				console.log(this);
				// console.log(event.currentTarget);
				console.log(event.target);
				// event.stopPropagation()
			});

			$('body').click(function(event) {
				console.log(this);
				// console.log(event.currentTarget);

				// event.target 如果没有事件冒泡，指的点击的目标对象
				console.log(event.target);
				console.log('body被点击了')
			});
		})
	</script>
</body>
</html>